package com.hub.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hub.entity.AuthMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hub.model.auth.AuthMenuVo;
import com.hub.model.auth.TreeBean;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hub
 * @since 2020-05-14
 */
@Repository
public interface AuthMenuMapper extends BaseMapper<AuthMenu> {

    /**
     * 查询列表
     * @param page
     * @param param
     * @return
     */
    IPage<AuthMenuVo> selectListByPage(Page<AuthMenu> page, @Param("param")AuthMenu param);

    /**
     * 菜单树
     * @return
     */
    List<TreeBean> selectMenuTree();

    /**
     * 根据父Id查询
     * @return
     */
    List<TreeBean> selectByPId();
}
